package com.blog;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;

public class MyServer
{

    public static ArrayList<Socket> socketList
            = new ArrayList<Socket>();
    public static void main(String[] args) throws IOException
    {
        ServerSocket ss = new ServerSocket(3666);
        while(true)
        {

            Socket s = ss.accept();
            socketList.add(s);

            new Thread(new com.blog.ServerThread(s)).start();
        }
    }
}
